/************************************************************************

								Heroes IV
					  Copyright 2001, The 3DO Company

	------------------------------------------------------------------
  							 skill_set.h

	$Header: $

	$NoKeywords: $

 ************************************************************************/

#ifndef SKILL_SET_H_INCLUDED
#define SKILL_SET_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <bitset>
#include <iosfwd>
#include "skill.h"

class t_skill_set : public std::bitset<k_skill_count>
{
	public:
		t_skill_set();
		t_skill_set(std::bitset<k_skill_count> const & source);
		bool read( std::streambuf& stream );
		bool read_version( std::streambuf& stream, int version );
		bool write( std::streambuf& stream ) const;
};

// ------------------------------------------------------------------------------
// Inline constructors
// ------------------------------------------------------------------------------
inline t_skill_set::t_skill_set()
{
}

inline t_skill_set::t_skill_set(std::bitset<k_skill_count> const & source)
	: std::bitset<k_skill_count>(source)
{
}


// ------------------------------------------------------------------------------
// Get the set of skills for the given types of skills 
// ------------------------------------------------------------------------------
t_skill_set const & get_skill_set(bool primary, bool secondary, bool magic, bool secular);


typedef std::bitset< k_skill_primary_count > t_primary_skill_set;


#endif //SKILL_SET_H_INCLUDED
